package game;
import java.awt.*;
import java.awt.event.KeyEvent;

import java.math.*;
import javax.swing.*;

public class Player
{

	/**
	 * @param args
	 */
	public Player()
	{
		JLabel intro= new JLabel("Welcome to Minesweeper. Please choose your level and then click Play.");
		JButton play= new JButton("Play");
		Listener playLis= new Listener("play");
		play.addActionListener(playLis);
		JButton instructions= new JButton("Instructions");
		instructions.addActionListener(new Listener("instructions"));
		//
		JButton hard= new JButton("Hard");
		hard.addActionListener(new Listener("hard"));
		JButton med= new JButton("Medium");
		med.addActionListener(new Listener("med"));
		JButton easy= new JButton("Easy");
		easy.addActionListener(new Listener("easy"));
		//
		Panel pane= new Panel(play, instructions, intro);
		
		JMenuBar menu= new JMenuBar();
		JMenu file= new JMenu("File");
		file.setMnemonic(KeyEvent.VK_F);
		
		JMenu settings= new JMenu("Settings");
		settings.setMnemonic(KeyEvent.VK_E);
		
		JMenu help= new JMenu("Help");
		help.setMnemonic(KeyEvent.VK_H);
		
		
		JMenuItem exit= new JMenuItem("Exit", KeyEvent.VK_X);
		exit.addActionListener(new Listener("exit"));
		
		JMenuItem save= new JMenuItem("Save", KeyEvent.VK_S);
		save.addActionListener(new Listener("save"));
		
		JMenuItem open= new JMenuItem("Open", KeyEvent.VK_O);
		open.addActionListener(new Listener("open"));
		
		JMenuItem newgame= new JMenuItem("New Game", KeyEvent.VK_N);
		newgame.addActionListener(new Listener("newgame"));
		
		JMenuItem rules= new JMenuItem("Instructions", KeyEvent.VK_F1);
		rules.addActionListener(new Listener("rules"));
		
		JMenuItem changeLevel= new JMenuItem("Change Level", KeyEvent.VK_L);
		changeLevel.addActionListener(new Listener("changeLevel"));
		
		JMenuItem customize= new JMenuItem("Customize", KeyEvent.VK_C);
		customize.addActionListener(new Listener("customize"));
		
		file.add(newgame);
		file.add(open);
		file.add(save);
		file.add(exit);
		settings.add(changeLevel);
		settings.add(customize);
		help.add(rules);
		menu.add(file);
		menu.add(settings);
		menu.add(help);
		
		
		Frame frame= new Frame(pane, menu, 500, 150);
		frame.setIconImage(new ImageIcon("images/mineImage.gif").getImage());
		frame.setVisible(true);
	}

	public static void main(String[] args) 
	{
		Player p= new Player();
	}
}

